﻿public class ErrorManager
{

    #region
    private static ErrorManager m_instance;
    public static ErrorManager Instance()
    {
        if (m_instance == null)
            m_instance = new ErrorManager();// obj.GetOrAddComponent<SceneMgr>();
        return m_instance;
    }
    #endregion

    string m_strLockKey = "";
    public void LockSkillError(string strKey)
    {
        m_strLockKey = strKey;
    }

    public void UnlockSkillError()
    {
        m_strLockKey = "";
    }

    public void ShowError(string strValue)
    {
#if UNITY_EDITOR
        SG.LogMgr.Instance().Log(strValue + "[" + m_strLockKey + "]");
#endif
    }

    string m_strStateKey = "";
    public void LockStateError(string strKey)
    {
        m_strStateKey = strKey;
    }
    public void UnlockStateError()
    {
        m_strStateKey = "";
    }

    public void ShowStateError(string strValue)
    {
        SG.LogMgr.Instance().LogError(strValue + "[" + m_strStateKey + "]");
    }
}
